export interface GoodsInfoResponse {
    msg: string;
    result: GoodsInfoData;
}

export interface GoodsInfoData {
    id: string;
    name: string;
    spuCode: string;
    desc: string;
    price: string;
    oldPrice: string;
    discount: number;
    inventory: number;
    brand: Brand;
    salesCount: number;
    commentCount: number;
    collectCount: number;
    mainVideos: any[];
    videoScale: number;
    mainPictures: string[];
    specs: Spec[];
    skus: Skus[];
    categories: Category[];
    details: Details;
    isPreSale: boolean;
    isCollect: null;
    recommends: null;
    userAddresses: null;
    similarProducts: SimilarProduct[];
    hotByDay: SimilarProduct[];
    evaluationInfo: null;
}

interface SimilarProduct {
    id: string;
    name: string;
    desc: string;
    price: string;
    picture: string;
    discount: null;
    orderNum: number;
}

interface Details {
    pictures: string[];
    properties: Property[];
}

interface Property {
    name: string;
    value: string;
}

interface Category {
    id: string;
    name: string;
    layer: number;
    parent: Parent | null;
}

interface Parent {
    id: string;
    name: string;
    layer: number;
    parent: null;
}

interface Skus {
    id: string;
    skuCode: string;
    price: string;
    oldPrice: string;
    inventory: number;
    specs: Spec2[];
}

interface Spec2 {
    name: string;
    valueName: string;
}

interface Spec {
    name: string;
    values: Value[];
}

interface Value {
    name: string;
    picture: null | string;
    desc: string;
}

interface Brand {
    id: string;
    name: string;
    nameEn: string;
    logo: null;
    picture: null;
    type: null;
    desc: null;
    place: null;
}



// 热销推荐
export interface HotRecommendResponse {
    msg: string;
    result: HotRecommendResult[];
}

export interface HotRecommendResult {
    id: string;
    name: string;
    desc: string;
    price: string;
    picture: string;
    discount: null;
    orderNum: number;
}

// 商品评论
export interface GoodsCommentResponse {
    msg: string;
    result: GoodsCommentResult;
}

export interface GoodsCommentResult {
    salesCount: number;
    praisePercent: string;
    evaluateCount: number;
    hasPictureCount: number;
    tags: Tag[];
}

interface Tag {
    title: string;
    tagCount: number;
}
export interface CommentDetailResponse {
    msg: string;
    result: CommentDetailResult;
}

export interface CommentDetailResult {
    counts: number;
    page: string;
    pageSize: number;
    pages: number;
    items: Item[];
}

interface Item {
    id: number;
    orderInfo: OrderInfo;
    member: Member;
    score: number;
    tags: string[];
    content: string;
    pictures: string[];
    officialReply: string;
    praiseCount: number;
    createTime: string;
}

interface Member {
    id: string;
    nickname: string;
    avatar: string;
}

interface OrderInfo {
    specs: Spec[];
    quantity: number;
    createTime: string;
}

interface Spec {
    name: string;
    nameValue: string;
}